﻿namespace System
{
	public struct Triangle3G
	{
		public V3G A, B, C;
		public V3G Center
		{
			get
			{
				V3G Res = (V3G)(((V3D)A + (V3D)B + (V3D)C) / 3);
				Res._Height = A._Height;
				return Res;
			}
		}
		public Triangle3G(V3G a, V3G b, V3G c)
		{
			A = a;
			B = b;
			C = c;
		}
	}

	public struct Circle3G
	{
		public V3G Center;
		public double Radius;
		public Circle3G(V3G c, double r)
		{
			Center = c;
			Radius = r;
		}
		public static Line3G Intersect(Circle3G C1, Circle3G C2)
		{
			double D = new Line3G(C1.Center, C2.Center, false).Length;
			if (D > C1.Radius + C2.Radius || D < Math.Abs(C1.Radius - C2.Radius))
				return new Line3G(V3G.Null, V3G.Null, false);

			return new Line3G(V3G.Null, V3G.Null, false);
		}
	}
}